﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace AIVision.InspectModule.Inspect.Models
{
    [XmlRoot("InspectCfgModel")]
    public class InspectCfgModel
    {
        /// <summary>
        /// 编号
        /// </summary>
        [XmlElement("Code")]
        public string Code { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        [XmlElement("Name")]
        public string Name { get; set; }
        /// <summary>
        /// 是否保存合格图片文件
        /// </summary>
        [XmlElement("IsInspectOKImage")]
        public bool IsInspectOKImage { get; set; }
        /// <summary>
        /// 是否保存缺陷图片文件
        /// </summary>
        [XmlElement("IsSaveDefectImage")]
        public bool IsSaveDefectImage { get; set; }
        /// <summary>
        /// 图片文件夹保存路径
        /// </summary>
        [XmlElement("ImageFileSavePath")]
        public string ImageFileSavePath { get; set; }
        //取图模式（直取，本地暂存）
        [XmlElement("ImageCache")]
        public bool ImageCache { get; set; }



        //检测类型、Base、DL、DL Obj
        [XmlElement("InspectType")]
        public string InspectType { get; set; }
        //HC脚本路径
        [XmlElement("HCFilePath")]
        public string HCFilePath { get; set; }
        //DL过程文件路径
        [XmlElement("DLProcessFilePath")]
        public string DLProcessFilePath { get; set; }
        //DL模型文件路径
        [XmlElement("DLModelFilePath")]
        public string DLModelFilePath { get; set; }
        //DL设备
        [XmlElement("DLDevice")]
        public string DLDevice { get; set; }
        [XmlElement("OKScore")]
        public int OKScore { get; set; }

        /// <summary>
        /// 拍照前延时
        /// </summary>
        [XmlElement("PhotoDelay")]
        public int PhotoDelay { get; set; }

        [XmlArray("DefectItems")]
        [XmlArrayItem("DefectItemModel")]
        public List<DefectItemModel> DefectItems { get; set; } = new List<DefectItemModel>();
    }
}
